<!DOCTYPE html>
<html lang="zh-CN" class="ua-windows ua-chrome ua-chrome50 ua-webkit ">
  
  <head>


      </style>
    <meta charset="utf-8">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Expires" content="Sun, 6 Mar 2005 01:00:00 GMT">
    <meta name="google-site-verification" content="Wyui6dsg_StZ9K3rJ6xtsNbxPhELyhMkEp2MsAhviBQ">
     <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta property="weixin:image" content="https://img3.doubanio.com/f/ark/be39d339b9b95b615e95c7dc542832c3e22ace84/pics/weixin_cover_new.png">
    <link rel="shortcut icon" href="https://img3.doubanio.com/f/ark/659eb773e1f2fa4ba28fd8e0946258b85e7984d4/pics/favicon/favicon.ico" type="image/x-icon">
    <link rel="mask-icon" href="https://img3.doubanio.com/f/ark/d3da4917e951bca9782cbd65f1d64e72056fb7aa/pics/favicon/safari-mask-icon.svg" color="#5795aa">
    <title>购物车 | 豆瓣阅读</title>
    <!--[if IE]>
      <script src="https://img3.doubanio.com/f/ark/9d2734cdfe07431638a9e30f56caa66f3d53fadf/js/widget/html5-elements.js"></script>
    <![endif]-->
    <link type="application/opensearchdescription+xml" rel="search" href="/opensearch" />
    <script>var Do = function() {
        Do.actions.push([].slice.call(arguments))
      };
      Do.ready = function() {
        Do.actions.push([].slice.call(arguments))
      },
      Do.add = Do.define = function(name, opts) {
        Do.mods[name] = opts
      },
      Do.global = function() {
        Do.global.mods = Array.prototype.concat(Do.global.mods, [].slice.call(arguments))
      },
      Do.global.mods = [],
      Do.mods = {},
      Do.actions = [];</script>
    <link href="/Css/main.css" rel="stylesheet" />
    <!--[if lt IE 9]>
      <link href="https://img3.doubanio.com/f/ark/a5d2ed28ebe110c9b09bbb11ef7a1c6374b95c48/css/store/mod/anti-old-ie.css" rel="stylesheet" />
    <![endif]-->
    <script src="https://img3.doubanio.com/f/ark/ac9d30d7ff4bb0bfceb2b349420b4ab21a3902e6/js/lib/define.js"></script>
    <script>Do.add('common', {
        path: "./Scripts/common.js",
        type: 'js'
      })

      Do.add('mod/cookie', {
        path: "./Scripts/cookie.js",
        type: 'js'
      })

      Do.add('mod/ajax', {
        path: "./Scripts/ajax.js",
        requires: ['mod/cookie'],
        type: 'js'
      })

      Do.add('mod/ga', {
        path: "https://img3.doubanio.com/f/ark/d61f0e07114d109bcdd79644aa2d968f31b73191/js/mod/ga.js",
        type: 'js'
      })

      Do.add('mod/lang', {
        path: "https://img3.doubanio.com/f/ark/b7eb760ea0fe3880082f30ba6478c43c9bbe5083/js/mod/lang.js",
        type: 'js'
      })

      Do.add('mod/emitter', {
        path: "https://img3.doubanio.com/f/ark/595a113fe6a47c5a82acc0ff9052e3fb37016caa/js/mod/emitter.js",
        requires: ['mod/lang'],
        type: 'js'
      })

      Do.add('mod/template', {
        path: "https://img3.doubanio.com/f/ark/cd74cfc553ee8bd0b4392729794f572c49d987b5/js/mod/template.js",
        requires: ['mod/lang'],
        type: 'js'
      })

      Do.add('mod/url', {
        path: "https://img3.doubanio.com/f/ark/03dbd90fa486f8e1a860ba8b91630f459305c2fc/js/mod/url.js",
        type: 'js'
      })

      Do.add('widget/profile', {
        path: "https://img3.doubanio.com/f/ark/ad566b682bbeebbf939142832a5cb3f51d44291b/js/widget/profile.js",
        requires: ['mod/template', 'mod/cookie'],
        type: 'js'
      })

      Do.add('ui/slide', {
        path: 'https://img3.doubanio.com/f/ark/e8cc931a46dc33c5354e09f552adb3521938e5f8/js/ui/slide.js',
        requires: ['mod/emitter'],
        type: 'js'
      })

      Do.add('ui/overlay', {
        path: 'https://img3.doubanio.com/f/ark/10680da9425d80d5cbdfa0327edb7ad721faaf53/js/ui/overlay.js',
        requires: ['mod/emitter'],
        type: 'js'
      })

      Do.add('ui/dialog', {
        path: 'https://img3.doubanio.com/f/ark/e8a43f9ee257794f17076b1cbb5a3de45c72251b/js/ui/dialog.js',
        requires: ['ui/overlay', 'mod/emitter'],
        type: 'js'
      })</script>
    <script>Do.add('search', {
        path: "https://img3.doubanio.com/f/ark/512cd69b42698c87d01f6536ff693dc9dd80d6c9/js/store/search.js",
        requires: ['mod/template'],
        type: 'js'
      });

      if (typeof Function.prototype.bind !== 'function') {
        Do.global("https://img3.doubanio.com/f/ark/5efe04ed153f66e11ae8c59475d22b07a222705a/js/lib/es5-shim/es5-shim.js", "https://img3.doubanio.com/f/ark/a46b1322d76fafcadd5ed236b90603b1febdb776/js/lib/es5-shim/es5-sham.js")
      }

      Do('common');</script>
    <script>Do.add('widget/purchase/ga', {
        path: 'https://img3.doubanio.com/f/ark/60f3f1455556ccceb17253cd2132da9d8365c430/js/widget/purchase/ga.js',
        requires: ['mod/ga'],
        type: 'js'
      })

      Do.add('lib/fsm', {
        path: 'https://img3.doubanio.com/f/ark/88e28c21bb1bcf512e5974a0691fef3b4ac00bf1/js/lib/state-machine.js',
        type: 'js'
      })

      Do.add('widget/payment', {
        path: 'https://img3.doubanio.com/f/ark/ee97d5828435a1ace64499fb63284e5f30be98d7/js/widget/payment.js',
        requires: ['mod/ajax', 'mod/template'],
        type: 'js'
      })

      Do.add('widget/purchase/index', {
        path: './Scripts/index.js',
        requires: ['mod/ajax', 'lib/fsm', 'mod/template', 'ui/dialog', 'widget/payment', 'widget/purchase/ga'],
        type: 'js'
      }) Do.add('widget/purchase/button', {
        path: './Scripts/button.js',
        requires: ['mod/template'],
        type: 'js'
      }) Do.add('widget/purchase/apply', {
        path: '/Scripts/apply.js',
        requires: ['widget/purchase/button', 'widget/purchase/index'],
        type: 'js'
      })</script>
    <link rel="stylesheet" href="./Css/wishlist.css" />
    <link rel="stylesheet" href="./Css/common.css" />
    <script>Do.add('wishlist', {
        path: 'https:/Scripts/wishlist.js',
        requires: ['mod/ajax', 'mod/cookie'],
        type: 'js'
      })</script>
    <script>(function(i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r;
        i[r] = i[r] ||
        function() { (i[r].q = i[r].q || []).push(arguments)
        },
        i[r].l = 1 * new Date();
        a = s.createElement(o),
        m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        m.parentNode.insertBefore(a, m)
      })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');</script>
    <script>ga('create', 'UA-7019765-12', {
        userId: '152231119'
      });</script>
  </head>
  
  <body itemscope itemtype="http://schema.org/WebPage">
    <div class="wrapper">
      <header>
        <div class="top-info">
          <div class="inner">
            <h1 title="豆瓣购物栏" class="logo">
              <a href="/">豆瓣阅读</a> 
</h1>
            <form action="/search" method="get" id="frm-search">
              <input type="text" name="q" maxlength="60" size="22" value="" placeholder="作品 / 电子书 / 专栏 / 连载 / 作者 / 出版社" autocomplete="off" style="width:400px"/>
              <input type="submit" value="搜索" style="float: right;height:31px;width:50px;"/></form>
            <ul id="suggest-list" class="suggests-list"></ul>
            <script id="tmpl-suggest-item" type="text/template">< li > {
                { - suggest
                }
              } < /li>/</script>
            <script>Do('search')</script>
            <ul class="entrances">
              <!-- _performtips_ -->
              
              
                  <span class="icon-subscription"></span>
                </a>
                <sup class="icon-flag flag-new"></sup>
              </li>
            </ul>
            
                    
                  </table>
                  <script>// XXX: 提醒页属于阅读器没有 jQuery 和 Do
                    if (typeof Do !== 'undefined') {
                      Do(function() {
                        function toggleMenu(showOrHide) {
                          menuContainer.toggle(showOrHide)
                        }
                        var moreActive = $(".more-active"),
                        menuContainer = moreActive.find(".more-items"),
                        bnMore = moreActive.find(".bn-more"),
                        hoverableBtns = moreActive.find(".bn-more-hoverable").add(bnMore),
                        useClick = "undefined" != typeof window.ontouchstart;
                        if (useClick) {
                          var doc = $(document),
                          menuContainerIsShown = !1,
                          toggleMenuWithClick = function(showOrHide) {
                            menuContainerIsShown ? doc.off(".moreItems") : doc.on("click.moreItems",
                            function(e) {
                              moreActive.has(e.target).length || toggleMenuWithClick(!1)
                            }),
                            menuContainerIsShown = !menuContainerIsShown,
                            toggleMenu(showOrHide)
                          };
                          return bnMore.click(function() {
                            toggleMenuWithClick()
                          }),
                          void hoverableBtns.click(function(e) {
                            e.preventDefault()
                          })
                        }
                        var moreActiveIsHover = !1,
                        moniterElements = $(hoverableBtns).add(menuContainer);
                        moniterElements.mouseenter(function() {
                          moreActiveIsHover = !0,
                          toggleMenu(!0)
                        }).mouseleave(function() {
                          moreActiveIsHover = !1,
                          setTimeout(function() {
                            moreActiveIsHover || toggleMenu(!1)
                          },
                          0)
                        }),
                        menuContainer.on("click", "a",
                        function() {
                          toggleMenu(!1)
                        })
                      });

                    }</script>
                </div>
              </li>
            </ul>
          </div>
          </nav>
      </header>
      <div class="main">
        <aside class="col col3">
          <section class="categories">
            
          </section>
        </aside>
        <article class="col col10">
          <h2>购物车</h2>


<form action="{{url('/home/dingdan/list')}}" method="post" enctype="mulite/form-data">    
  <input type="hidden" name="id" value="{{$uid}}">
  <input type="hidden" name="gid" value="{{$goods['id']}}">
  <input type="hidden" name="inum" value="{{$goods['num']}}">

    <table border="1" class="table table-striped">
   <thead>
    <tr>
      <!--  <th class="select-all"><label class="checkbox"><input type="checkbox" />全选</label></th> -->
       <th class="th-name">作品{{$uid}}</th>
       <th class="th-price">本书</th>
       <th class="th-price">价格</th>
       <th class="th-price">总价</th>

       <th class="th-op">操作</th>
    </tr>

<!-- 表单 -->
    <tr>
    <!--  <td class="select-all"><input type="checkbox" /></td> -->
     <td class="sname">{{$goods['uname']}}</td>
     <td class="th-price">
     <div class="quantity">
       <input type="button" value="-" class="minus" style="width:20px">
       <input type="text" step="1" min="1" name="inum" value="{{$goods['num']}}" title="Qty" class="input-text" style="width:60px";>
       <input type="button" value="+" class="plus" style="width:20px">         
     </div>  
     </td>
     <td class="price" name="price">{{$goods['price']}}</td>
     <td class="prayment" name="payment">{{$goods['price'] * $goods['num']}}元</td>
      <th class="th-price">
        <a class="fa fa-trash-o delete">删除</a>
      </th>
    </tr>

<!-- 表单结束 -->


   </thead>
   <tbody></tbody>
  </table>
  {{csrf_field()}}
  <button type="submit" class="btn btn-icon bulk-purchase">提交</button>
</form> 
         
        </article>
        <script>Do('wishlist')</script>
        <footer>
          <div class="inner">
            <div class="copyright">&copy; 2005 - 2016 douban.com, all rights reserved
              <br>网络视听许可证
              <a href="https://www.douban.com/about?topic=licence" target="_blank">0110418</a>号 &nbsp;&nbsp;文网文[2009]267号&nbsp;&nbsp;新出网证(京)字129号
              <img width="15" height="17" src="/Images/biaoshi.png" /></div>
            <div class="ft-nav">
              <a href="/contact">联系我们</a>·
              <a href="/copyright">版权声明</a>·
              <a href="https://help.douban.com/help/ask?category=book&amp;type=39">使用反馈</a>·
              <a href="/faq">常见问题</a>·
              <a href="/careers">来这里工作</a></div>
            <script>Do('mod/cookie',
              function() {
                $('.go-mobile').on('click',
                function(e) {
                  e.preventDefault();
                  Ark.cookie('page_style', 'mobile', {
                    path: '/',
                    'max-age': 60 * 60 * 24
                  });
                  location.reload();
                });
              });</script>
          </div>
        </footer>
        <script src="./Scripts/init.js" data-cfg-corelib="./Scripts/jquery.js"></script>
      </div>
      </div>
      <script>var _paq = _paq || [];
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']); (function() {
          var p = (('https:' == document.location.protocol) ? 'https': 'http'),
          u = p + '://fundin.douban.com/';
          _paq.push(['setTrackerUrl', u + 'piwik']);
          _paq.push(['setSiteId', '100001']);
          var d = document,
          g = d.createElement('script'),
          s = d.getElementsByTagName('script')[0];
          g.type = 'text/javascript';
          g.defer = true;
          g.async = true;
          g.src = p + '://img3.doubanio.com/dae/fundin/piwik.js';
          s.parentNode.insertBefore(g, s);
        })();

        ga('require', 'ecommerce', 'ecommerce.js');
        ga('require', 'campaignLoader', {
          debug: false
        });
        ga('campaignLoader:loadCampaignFields');

        ga('send', 'pageview', {
          hitCallback: window.Ark && Ark.onGAPageViewDone
        });

        ga('set', 'dimension1', '0');

        ga('set', 'dimension2', '1');

        ga('set', 'dimension5', 'a');

        ga('set', 'dimension3', 'desktop');</script>
      <script async="async" src="https://img3.doubanio.com/f/ark/e07f07839543a3ec88834c3680e95b8c17d96819/js/widget/campaign-loader.js"></script>
      <!-- sindar28c-docker -->
      <script type="text/javascript" src="/Scripts/jquery-1.8.3.min.js"></script>
      <script type="text/javascript">
  
  // alert($);
  $('.plus').click(function(){
    // alert(222);
    // alert($);
   // 获取当前数量
    // var num = parseInt($('input[title=Qty]').val());
    var num = parseInt($(this).prev().val());
    num = num+1;
    //修改属性
    $(this).prev().val(num);
  });
  

  $('.minus').click(function(){
    //获取当前数量
    var num = parseInt($(this).next().val());
    num = num-1;
    if(num == 0)return;
    //修改属性
     $(this).next().val(num);
  });
</script>

   <script type="text/javascript">
    $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });
       $('.delete').click(function(){
            
           var id = $(this).parents('tr').find('.sname').html();
           // console.log(id);
           var dd = $(this);
           //发送ajax
            $.post('/home/car/delete',{id:id},function(data){

              if(data == 1 ){
                 dd.parents('tr').remove();
              }else{
                alert('失败');
              }
            })
           return  false;
       })

       
    </script>
      </body>

</html>

